import request from '../utils/request'
import { HttpMethod } from '../utils/http'


export default {
  // 保存浏览历史
  save (productId) {
    let data = {
      productId: productId
    }
    return request({
      url: '/beauty/productHistory/save',
      method: HttpMethod.POST,
      data
    })
  },
  // 清空历史
  clearHistory () {
    return request({
      url: '/beauty/productHistory/clearHistory',
      method: HttpMethod.DELETE
    })
  },
  // 分页查询
  list (current, size) {
    return request({
      url: `/beauty/productHistory/list/${current}/${size}`,
      method: HttpMethod.GET
    })
  },
  // 根据id删除
  remove (productHistoryId) {
    return request({
      url: `/beauty/productHistory/${productHistoryId}`,
      method: HttpMethod.DELETE
    })
  }
}
